<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PinCRT: Process</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">PinCRT
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Process</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga8bd862a08dc24374bb76ac7124ef0bcf"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#ga8bd862a08dc24374bb76ac7124ef0bcf">OS_FnPtrCreateProcess</a>) (const CHAR *args, <a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *stdFiles, <a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *closeFiles, char **environ, <a class="el" href="group__OS__APIS__FILE.html#ga125af12a5b69613338937bddae2383dc">OS_PROCESS_WAITABLE_PROCESS</a> *process)</td></tr>
<tr class="separator:ga8bd862a08dc24374bb76ac7124ef0bcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0b17ba1327ccfea88254c4f756fef977"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#ga0b17ba1327ccfea88254c4f756fef977">OS_GetPid</a> (<a class="el" href="group__OS__APIS__TYPES.html#gae6c37d3a178129452bbb6e591c13aeb0">NATIVE_PID</a> *pid)</td></tr>
<tr class="separator:ga0b17ba1327ccfea88254c4f756fef977"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga289a76b88b164c1cfda0742645f7e8e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#ga289a76b88b164c1cfda0742645f7e8e5">OS_GetCommandLine</a> (<a class="el" href="group__OS__APIS__TYPES.html#gae6c37d3a178129452bbb6e591c13aeb0">NATIVE_PID</a> pid, USIZE *argc, CHAR ***argv, USIZE *bufsize)</td></tr>
<tr class="separator:ga289a76b88b164c1cfda0742645f7e8e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99c9c3d3b11c60be66224a102d95a867"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#ga99c9c3d3b11c60be66224a102d95a867">OS_GetEnvironmentBlock</a> (<a class="el" href="group__OS__APIS__TYPES.html#gae6c37d3a178129452bbb6e591c13aeb0">NATIVE_PID</a> pid, CHAR ***block, USIZE *bufSize)</td></tr>
<tr class="separator:ga99c9c3d3b11c60be66224a102d95a867"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga96b1e69588603f23c605868d0c36ffc7"><td class="memItemLeft" align="right" valign="top">NORETURN void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#ga96b1e69588603f23c605868d0c36ffc7">OS_ExitProcess</a> (INT code)</td></tr>
<tr class="separator:ga96b1e69588603f23c605868d0c36ffc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34e89a8acf2f05c8c23d91a50c1a9887"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#ga34e89a8acf2f05c8c23d91a50c1a9887">OS_IsDebuggerPresent</a> (<a class="el" href="group__OS__APIS__TYPES.html#gae6c37d3a178129452bbb6e591c13aeb0">NATIVE_PID</a> pid, <a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a> *isPresent)</td></tr>
<tr class="separator:ga34e89a8acf2f05c8c23d91a50c1a9887"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa1b660e1cd13879aa9319982f5cbfd47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#gaa1b660e1cd13879aa9319982f5cbfd47">OS_GetUid</a> (NATIVE_UID *uid)</td></tr>
<tr class="separator:gaa1b660e1cd13879aa9319982f5cbfd47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c868fc95617a27ed0aaf461bd23b35a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#ga9c868fc95617a27ed0aaf461bd23b35a">OS_FindStdFiles</a> (<a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *files)</td></tr>
<tr class="separator:ga9c868fc95617a27ed0aaf461bd23b35a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa9620cd977f61b2f28daeefa12328420"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#gaa9620cd977f61b2f28daeefa12328420">OS_CreateProcess</a> (const CHAR *args, <a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *stdFiles, <a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *closeFiles, char **environ, <a class="el" href="group__OS__APIS__FILE.html#ga125af12a5b69613338937bddae2383dc">OS_PROCESS_WAITABLE_PROCESS</a> *process)</td></tr>
<tr class="separator:gaa9620cd977f61b2f28daeefa12328420"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaca3e931968023024b3d138f2c405acb7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#gaca3e931968023024b3d138f2c405acb7">OS_WaitForProcessTermination</a> (<a class="el" href="group__OS__APIS__FILE.html#ga125af12a5b69613338937bddae2383dc">OS_PROCESS_WAITABLE_PROCESS</a> process, UINT32 *exitStatus)</td></tr>
<tr class="separator:gaca3e931968023024b3d138f2c405acb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa90fe0f9819e43a033184fe458395edc"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#gaa90fe0f9819e43a033184fe458395edc">OS_TriggerSoftwareBreakpoint</a> ()</td></tr>
<tr class="separator:gaa90fe0f9819e43a033184fe458395edc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2b75c43f07df97fc2a88fbe9ba93b928"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#ga2b75c43f07df97fc2a88fbe9ba93b928">OS_NotifyFork</a> ()</td></tr>
<tr class="separator:ga2b75c43f07df97fc2a88fbe9ba93b928"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5590cce183f90fe61ca6304487143a3e"><td class="memItemLeft" align="right" valign="top">UINT32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__OS__APIS__PROCESS.html#ga5590cce183f90fe61ca6304487143a3e">OS_GetForksCount</a> ()</td></tr>
<tr class="separator:ga5590cce183f90fe61ca6304487143a3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga8bd862a08dc24374bb76ac7124ef0bcf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8bd862a08dc24374bb76ac7124ef0bcf">&#9670;&nbsp;</a></span>OS_FnPtrCreateProcess</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a>(* OS_FnPtrCreateProcess) (const CHAR *args, <a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *stdFiles, <a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *closeFiles, char **environ, <a class="el" href="group__OS__APIS__FILE.html#ga125af12a5b69613338937bddae2383dc">OS_PROCESS_WAITABLE_PROCESS</a> *process)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Type definition of a pointer to an OS_CreateProcess function. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaa9620cd977f61b2f28daeefa12328420"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa9620cd977f61b2f28daeefa12328420">&#9670;&nbsp;</a></span>OS_CreateProcess()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a> OS_CreateProcess </td>
          <td>(</td>
          <td class="paramtype">const CHAR *&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *&#160;</td>
          <td class="paramname"><em>stdFiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *&#160;</td>
          <td class="paramname"><em>closeFiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>environ</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__FILE.html#ga125af12a5b69613338937bddae2383dc">OS_PROCESS_WAITABLE_PROCESS</a> *&#160;</td>
          <td class="paramname"><em>process</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a process, possibly redirect its standard input/output/error. The process is created using the system command line interpreter or shell.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>Full command line for the process. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stdFiles</td><td>Points to an array of NATIVE_FD objects with at least 3 elements. These elements will be used to determine the file descriptors: STDIN, STDOUT, STDERR respectively of the newly created process. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">closeFiles</td><td>(Optional) Points to an array of NATIVE_FD objects that needs to be closed in the context of the created proces. The last entry of this array should be INVALID_NATIVE_FD. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">environ</td><td>Pointer to the environment block to use in the new process. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">process</td><td>An opaque object representing the created process. One can wait for the process termination by calling <a class="el" href="group__OS__APIS__PROCESS.html#gaca3e931968023024b3d138f2c405acb7">OS_WaitForProcessTermination</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Operation status code. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">OS_RETURN_CODE_NO_ERROR</td><td>If the operation succeeded </td></tr>
    <tr><td class="paramname">OS_RETURN_CODE_PROCESS_QUERY_FAILED</td><td>If the operation Failed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga96b1e69588603f23c605868d0c36ffc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga96b1e69588603f23c605868d0c36ffc7">&#9670;&nbsp;</a></span>OS_ExitProcess()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NORETURN void OS_ExitProcess </td>
          <td>(</td>
          <td class="paramtype">INT&#160;</td>
          <td class="paramname"><em>code</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Exits the current process.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">code</td><td>Process descriptor</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga9c868fc95617a27ed0aaf461bd23b35a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9c868fc95617a27ed0aaf461bd23b35a">&#9670;&nbsp;</a></span>OS_FindStdFiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a> OS_FindStdFiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#gaeb77513b3223d163064c7b1f5e38e8c3">NATIVE_FD</a> *&#160;</td>
          <td class="paramname"><em>files</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Queries whether the current process is being debugged.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">files</td><td>Points to an array of NATIVE_FD objects with at least 3 elements. These elements will be filled with the file descriptors of STDIN, STDOUT, STDERR respectively.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Operation status code. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">OS_RETURN_CODE_NO_ERROR</td><td>If the operation succeeded </td></tr>
    <tr><td class="paramname">OS_RETURN_CODE_PROCESS_QUERY_FAILED</td><td>If the operation Failed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga289a76b88b164c1cfda0742645f7e8e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga289a76b88b164c1cfda0742645f7e8e5">&#9670;&nbsp;</a></span>OS_GetCommandLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a> OS_GetCommandLine </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#gae6c37d3a178129452bbb6e591c13aeb0">NATIVE_PID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">USIZE *&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CHAR ***&#160;</td>
          <td class="paramname"><em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">USIZE *&#160;</td>
          <td class="paramname"><em>bufsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Retrieve the command line for a given process.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pid</td><td>Process descriptor </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">argc</td><td>Command line's argc </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">argv</td><td>Command line's argv array, allocated by this function (with <a class="el" href="group__OS__APIS__MEMORY.html#ga292fe0be7839ed9cc970254d288bb199">OS_AllocateMemory()</a>) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">bufsize</td><td>Size in bytes of the buffer pointer by argv</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Operation status code. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">OS_RETURN_CODE_NO_ERROR</td><td>If the operation succeeded </td></tr>
    <tr><td class="paramname">OS_RETURN_CODE_PROCESS_QUERY_FAILED</td><td>If the operation Failed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga99c9c3d3b11c60be66224a102d95a867"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga99c9c3d3b11c60be66224a102d95a867">&#9670;&nbsp;</a></span>OS_GetEnvironmentBlock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a> OS_GetEnvironmentBlock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#gae6c37d3a178129452bbb6e591c13aeb0">NATIVE_PID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">CHAR ***&#160;</td>
          <td class="paramname"><em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">USIZE *&#160;</td>
          <td class="paramname"><em>bufSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Retrieve pointer to process environment variables block encoded in UTF8.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pid</td><td>Process descriptor. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">block</td><td>Return pointer to point to the environment block. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">bufSize</td><td>Number of bytes allocated for the envrionement block.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Operation status code. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">OS_RETURN_CODE_NO_ERROR</td><td>If the operation succeeded </td></tr>
    <tr><td class="paramname">OS_RETURN_CODE_PROCESS_UPDATE_FAILED</td><td>If the operation Failed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>On Linux and macOS* this function will retrieve the initial environment block that was valid when the process started. This function doesn't catch up with changes done to the environment variables while the process is running. </dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga5590cce183f90fe61ca6304487143a3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5590cce183f90fe61ca6304487143a3e">&#9670;&nbsp;</a></span>OS_GetForksCount()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UINT32 OS_GetForksCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the current generation of forked processes. This value is increased by one every time <a class="el" href="group__OS__APIS__PROCESS.html#ga2b75c43f07df97fc2a88fbe9ba93b928">OS_NotifyFork()</a> is called.</p>
<dl class="section user"><dt>Availability:</dt><dd><ul>
<li><b>O/S</b>: Linux &amp; macOS*</li>
<li><b>CPU:</b> All </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga0b17ba1327ccfea88254c4f756fef977"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0b17ba1327ccfea88254c4f756fef977">&#9670;&nbsp;</a></span>OS_GetPid()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a> OS_GetPid </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#gae6c37d3a178129452bbb6e591c13aeb0">NATIVE_PID</a> *&#160;</td>
          <td class="paramname"><em>pid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Retrieves the process ID of the current process.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">pid</td><td>Process descriptor</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Operation status code. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">OS_RETURN_CODE_NO_ERROR</td><td>If the operation succeeded </td></tr>
    <tr><td class="paramname">OS_RETURN_CODE_PROCESS_QUERY_FAILED</td><td>If the operation Failed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaa1b660e1cd13879aa9319982f5cbfd47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa1b660e1cd13879aa9319982f5cbfd47">&#9670;&nbsp;</a></span>OS_GetUid()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a> OS_GetUid </td>
          <td>(</td>
          <td class="paramtype">NATIVE_UID *&#160;</td>
          <td class="paramname"><em>uid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Queries whether the current process is being debugged.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">uid</td><td>Process descriptor</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Operation status code. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">OS_RETURN_CODE_NO_ERROR</td><td>If the operation succeeded </td></tr>
    <tr><td class="paramname">OS_RETURN_CODE_PROCESS_QUERY_FAILED</td><td>If the operation Failed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga34e89a8acf2f05c8c23d91a50c1a9887"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga34e89a8acf2f05c8c23d91a50c1a9887">&#9670;&nbsp;</a></span>OS_IsDebuggerPresent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a> OS_IsDebuggerPresent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#gae6c37d3a178129452bbb6e591c13aeb0">NATIVE_PID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__TYPES.html#gad312c486942310e24394e7ea81f8f7e1">BOOL_T</a> *&#160;</td>
          <td class="paramname"><em>isPresent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Queries whether the current process is being debugged.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">pid</td><td>Process descriptor </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">isPresent</td><td>True if the process 'pid' is being debugged.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Operation status code. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">OS_RETURN_CODE_NO_ERROR</td><td>If the operation succeeded </td></tr>
    <tr><td class="paramname">OS_RETURN_CODE_PROCESS_QUERY_FAILED</td><td>If the operation Failed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="ga2b75c43f07df97fc2a88fbe9ba93b928"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2b75c43f07df97fc2a88fbe9ba93b928">&#9670;&nbsp;</a></span>OS_NotifyFork()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OS_NotifyFork </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Notify the locking mechanism about a forked child.</p>
<dl class="section note"><dt>Note</dt><dd>Must be called earliest as possible by the child process after it was created for functional correctness.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><ul>
<li><b>O/S</b>: Linux &amp; macOS*</li>
<li><b>CPU:</b> All </li>
</ul>
</dd></dl>

</div>
</div>
<a id="gaa90fe0f9819e43a033184fe458395edc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa90fe0f9819e43a033184fe458395edc">&#9670;&nbsp;</a></span>OS_TriggerSoftwareBreakpoint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID OS_TriggerSoftwareBreakpoint </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Trigger a software breakpoint. When the current process is attached to a debugger, this function will stop the process and notify the debugger about a breakpoint that was triggered.</p>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gaca3e931968023024b3d138f2c405acb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaca3e931968023024b3d138f2c405acb7">&#9670;&nbsp;</a></span>OS_WaitForProcessTermination()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__OS__APIS__DEF.html#ga8e6b2f5406a922a419991358caae6fc7">OS_RETURN_CODE</a> OS_WaitForProcessTermination </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__OS__APIS__FILE.html#ga125af12a5b69613338937bddae2383dc">OS_PROCESS_WAITABLE_PROCESS</a>&#160;</td>
          <td class="paramname"><em>process</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UINT32 *&#160;</td>
          <td class="paramname"><em>exitStatus</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Wait for process termination.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">process</td><td>An opaque object representing the process to wait for. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">exitStatus</td><td>The exit status of the terminated process.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Operation status code. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">OS_RETURN_CODE_NO_ERROR</td><td>If the operation succeeded </td></tr>
    <tr><td class="paramname">OS_RETURN_CODE_PROCESS_QUERY_FAILED</td><td>If the operation Failed</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>O/S</b>: Windows, Linux &amp; macOS*<br  />
 <b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
